import {CommonEntity} from "~/common/entity/common.entity";
import {Column, Entity, Index, JoinTable, ManyToMany} from "typeorm";
import {StaffEntity} from "~/modules/consult/staff/staff.entity";

@Index(["id"])
@Entity({name: "consult_staff_tag"})
export class StaffTagEntity extends CommonEntity {
  // 标签名称、标签描述、标签状态
  @Column({type: "varchar", length: 50, comment: "标签名称"})
  name: string;

  @Column({type: "text", comment: "标签描述"})
  description: string;

  @Column({type: "tinyint", comment: "标签状态"})
  status: number;

  @ManyToMany(() => StaffEntity, staff => staff.tags)
  staffs: StaffEntity[];
}
